1. Field of the Invention
The present invention relates to printers, and more specifically to a method and apparatus for accurately scheduling rendering of bands in a printer.
2. Related Art
Printers are often used to print a specified content (received from an external system such as personal computers) on medium such as paper. The content to be printed (xe2x80x9cpage contentxe2x80x9d) is typically specified by page description languages (PDL) such as Postscript (PS) and Printer Control Language (PCL), as is well known in the relevant arts. Printing generally entails converting a page content specified by a PDL to a corresponding bit map. The bit map may then be used to print the content on the desired medium.
To facilitate generation of bit maps, a page is often divided into bands. A band generally refers to a rectangular section spanning the entire width of the page. A bit map is generally generated for each band, and sent for printing. Bit maps of consecutive bands may thus be sent to print a specified page content on a page.
Printers often generate a bit map corresponding to one band while printing a previous band. One potential problem with such an approach is that a bit map of a band may not be generated (or unavailable in general) by the time a previous band has been sent for printing. Such unavailability may be undesirable at least in laser technology based printers in that the printer may not be able to stop in the middle of printing a page. One approach to address such a problem is to render all the bands in a page before beginning to printing the page. Unfortunately, such solutions may require large amounts of memory and may thus be undesirable.
In an alternative approach, an attempt is made to determine the bands (xe2x80x9ccomplex bandsxe2x80x9d) which require more processing time/power to generate corresponding bit maps by examining the PDL and/or the display lists for the bands. The complex bands may then be scheduled for rendering ahead of potentially several earlier bands in a page. As a result, a printer may increase the probability that the bit maps of even the complex bands are timely available for sending to printing.
Unfortunately, the approaches (based on examination of PDL and/or display lists) used for estimation of complexity are often imprecise. In other words, the complexity may be over-estimated or under-estimated. In case of under-estimation, the bit map may not be timely available to send for printing. As a result, the corresponding page may not be printed accurately.
In case of over-estimation, a page may be rendered ahead of actual need, in which case available memory is unnecessarily used to store the generated bit maps. If a printer is constrained by memory space availability, the bit maps may be stored in compressed format and then decompressed before sending for printing. Unfortunately, compression and decompression consume processing cycles, and may thus be undesirable. To use available memory-more efficiently, a printer may use xe2x80x98lossyxe2x80x99 compression techniques, in which case the quality of printed images may suffer.
Therefore, what is needed is a method and apparatus to accurately schedule rendering of bands in a printer.
An embodiment of a printer controller in accordance with the present invention may render a portion in a plane of a page to determine the resources e.g., processing time and/or memory required to render the portion. The measured parameters may then be used to estimate the resources required to render the portions in the other planes. The estimations in turn can be used to pre-schedule complex portions for rendering such that the bit maps of the complex portions are timely available for printing.
As a strong correlation may exist between similarly situated portions in different planes, the measured parameters may accurately reflect the worst case complexity of the bands in all the planes. Accordingly, only necessary portions may be pre-scheduled for rendering, thereby leading to efficient use of memory space. In one embodiment, each portion corresponds to a band spanning the entire page width.
In one implementation, the page content is first converted to CMYK color space if the PDL statements provide the data in other color spaces, and the black (K) plane is rendered first to measure the resources required. As the K-plane typically contains a corresponding component of any object in the other three (CMY) planes, the bands in the K-plane may accurately reflect the complexity of bands in other planes.
By accurately estimating the complexity of different portions of a page, the portions can be pre-scheduled accurately. As a result, bit maps of the portions may be timely available for printing and pages may be printed accurately. In addition, the available memory and processing power may not be wasted due to any use of compressions techniques.